home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Code Resources / Arrow CDEF / README < prev   
Encoding:
Text File  |  1994-03-30  |  2.7 KB  |  45 lines  |  [ttro/ttxt]

  1. •••••••••••••••••••••••••••
  2. ArrowCDEF
  3. Copyright © 1994 David Hay
  4. •••••••••••••••••••••••••••
  5.  
  6. About ArrowCDEF
  7. ---------------
  8.     ArrowCDEF is a CDEF that implements an up-down arrow like those seen in the color picker. It supports the ability to use any PICT resource as the arrow, so you can make your arrows look however you like. There is both a black & white and a color set of PICT's in "ArrowCDEF Tester.π.rsrc" which you can use if you don't want to design you own.
  9.     
  10. Using ArrowCDEF
  11. ---------------
  12.     To use ArrowCDEF, just include the CDEF in your program's resource file and add it to your window or dialog. The reference constant of the control should contain the resource ID of an 'APIC' resource, which tells the control which PICT resources should be used to draw the arrow in each of it's four states. There should be a PICT resource for when the up arrow is pressed, when the down arrow is pressed, when no arrows are pressed and when the arrow is inactive. There is a TMPL resource in "ArrowCDEF Tester.π.rsrc" for editing 'APIC' resources.
  13.  
  14.     ArrowCDEF only draws the arrow, it does not draw an indicator, or value of any kind. The application is responsible for updating and displaying any kind of value. See "ArrowCDEF Tester.c" for an example of how an action procedure is used to change and display the value of a control. ArrowCDEF uses the same part codes as the scroll bars. When the up arrow is pressed, "inUpButton" is the part code returned. "inDownButton" the part code returned when the down arrow is pressed.
  15.         
  16.     The file "ArrowCDEF.h" defines some useful constants such as the CDEF resource ID, the control definition ID, the resource type that describes which PICTs to use for the arrow.
  17.  
  18. Acknowledgements
  19. -----------------
  20. Thanks to Eddy J. Gurney for helping a novice to Macintosh programming (me) and for showing me that Geneva 9 pt is a really cool font to program in!
  21.  
  22. Legal Stuff
  23. ----------
  24. Copyright © 1994  David Hay
  25.  
  26. This program is free software; you can redistribute it and/or modify
  27. it under the terms of the GNU General Public License as published by
  28. the Free Software Foundation; either version 2 of the License, or
  29. (at your option) any later version.
  30.  
  31. This program is distributed in the hope that it will be useful,
  32. but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  34. GNU General Public License for more details.
  35.  
  36. You should have received a copy of the GNU General Public License
  37. along with this program; if not, write to the Free Software
  38. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  39.  
  40. Comments and questions are welcome:
  41. E-mail:        hay@cs.colorado.edu
  42. US Mail:     David Hay
  43.                              117 Piedra Loop
  44.                              Los Alamos, NM 87544
  45.